board_functions = function()
{	
	this.collapse = function(id)
	{
		var board_id = parseInt(id);
		
		$.ajax({
			url: smf_scripturl+'?action=boardFunc',
			type: 'post',
			data: {id: board_id, perform: 'collapse'},
			async: false,
			dataType: 'json',
			success: function (jsonData)
			{
				alert('do something!');
			}
		});
	}
}
var board = new board_functions();